<template>
  <el-container style="height: 500px; border: 1px solid #eee">
    <el-aside :width="aside_width" style="background-color: rgb(5,4,4);height: 100vh;margin-left: -1px">
      <Menu :isCollapse='isCollapse'></Menu>
    </el-aside>

    <el-container style="height: 100vh;width: 100vh">
      <el-header style="text-align: right; font-size: 12px;height: 100px;">
      <Header @doCollapse='doCollapse' :icon='icon'></Header>
      </el-header>

      <el-main style="padding: 0px;">
<!--        <Main></Main>-->
<!--        <Main2></Main2>-->
        <router-view></router-view>
      </el-main>
    </el-container>
  </el-container>
</template>

<script>
import Menu from "@/components/Index_zujian/Menu"
import Header from "@/components/Index_zujian/Header"
import Main from "@/components/Index_zujian/Main"
// import Main2 from "../../chatgpt-web-application-master/client/assets/Main2"
export default {

  name: "Index",
  components: {Menu,Header,Main},
  data() {
  return{
    isCollapse:false,
    aside_width:'200px',

    icon:'el-icon-s-fold',
  }
  },
  methods:{
    doCollapse() {
      this.isCollapse=!this.isCollapse
      if (this.isCollapse){
        //关闭
        this.aside_width='64px'
        this.icon='el-icon-s-unfold'
      }else{
        //展开
        this.aside_width='200px'
        this.icon='el-icon-s-fold'
      }
    }
  }
}
</script>

<style scoped>
.el-header {
  background-color: #183356;
  color: #ffffff;
  line-height: 60px;
}

.el-aside {
  color: #333;
}
</style>